clear all
clc
x=[100 100 100 100 200 200 200 200 300 300 300 300 400 400 400 400];
y=[100 200 300 400 100 200 300 400 100 200 300 400 100 200 300 400];
z=[536 597 524 378 598 612 530 378 580 574 498 312 562 526 452 234];
xi=100:5:400;
yi=100:5:400;
[X,Y]=meshgrid(xi,yi);
H=griddata(x,y,z,X,Y,'cubic');
surf(X,Y,H);
view(-112,26);
hold on;
maxh=vpa(max(max(H)),6)
[r,c]=find(H>=single(maxh));
stem3(X(r,c),Y(r,c),maxh,'fill')
